#!/bin/bash

# 检查IPv6路由广告是否已禁用
if [[ $(sysctl -n net.ipv6.conf.all.accept_ra 2>/dev/null) -eq 0 ]]; then
    echo "通过：net.ipv6.conf.all.accept_ra 已禁用"
else
    echo "失败：net.ipv6.conf.all.accept_ra 未禁用"
    exit 1
fi

if [[ $(sysctl -n net.ipv6.conf.default.accept_ra 2>/dev/null) -eq 0 ]]; then
    echo "通过：net.ipv6.conf.default.accept_ra 已禁用"
else
    echo "失败：net.ipv6.conf.default.accept_ra 未禁用"
    exit 1
fi